<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!-- <a v-bind:href="url">{{msg}}</a> -->
        <!-- 单向数据绑定 -->
        <input type="text" v-bind:value='msg'>   
        <input type="text" v-model='msg'>
        {{msg}}
        <!-- v-bind简写模式 -->
        <a :href="url">{{msg}}</a>
        <button @click='a'>切换</button>
    </div>
</body>
<script src="./V/vue.js"></script>
<script>
        var vm = new Vue({
        el:'#app',
        data:{
            url:'http://www.baidu.com',
            msg:'百度'
        },methods:{
            a:function(){
                this.url='http://www.itcast.com'
                this.msg="黑马"
            }
        }
        })
</script>
</html>